#ifndef __DMD_H__
#define __DMD_H__

class IUIEventHandler;

typedef struct tagPixel
{
	int x;
	int y;
} S_Pixel;

typedef struct tagDmd
{
	int nColor;
	BOOL bRotate;
	S_Pixel center;
	std::list<S_Pixel> lstPixels;
} S_Dmd;

class CDmd
{
public:
	CDmd(int nColor, BOOL bRotate, S_Pixel center, std::list<S_Pixel> lstPixels, IUIEventMgr* pUIEventMgr);
	~CDmd();

	BOOL Rotate();
	BOOL Left();
	BOOL Right();
	BOOL Down();
	void Drop();
	int GetColor();
	const std::list<S_Pixel>& GetPixels();

private:
	void Freeze();

private:
	IUIEventHandler *m_pUIEventHandler;
};

#endif __DMD_H__
